how to make a bar race with python